<?php
if (!defined('IN_ZWS')) exit();

class AddCategoryModel extends Model {
	protected $tableName = 'Group_Category';
	protected $_validate = array(
		array('cname', 'require', '类别名不能为空！', 1),
		array('cname', 'checklen', '类别名长度过长！', 1, 'callback'),
		array('res', '0,2', '资源类型选择错误！', 1, 'between'),
		);

	function checklen($data) {
		return strlen($data) > 20 ? false:true;
	}

}
